        <include file="Public:top_frame" />
        <!-- /section:basics/navbar.layout -->
        <div class="main-container" id="main-container">
            <script type="text/javascript">
                try {ace.settings.check('main-container' ,'fixed')}catch(e){}
            </script>

            <include file="Public:left_frame" />

            <!-- /section:basics/sidebar -->
            <div class="main-content">
                <div class="main-content-inner">
                    <!-- #section:basics/content.breadcrumbs -->
                    <div class="breadcrumbs" id="breadcrumbs">
                        <script type="text/javascript">
                            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
                        </script>
                        <ul class="breadcrumb">
                            <li>
                                <i class="ace-icon fa fa-home home-icon"></i>
                                <a href="{:U('/index/index')}">首页</a>
                            </li>
                            <li>
                                <a href="{:U('/match/index')}">大赛管理</a>
                            </li>
                            <li class="active">{$info.name}</li>
                        </ul><!-- /.breadcrumb -->
                    </div>
                    <!-- /section:basics/content.breadcrumbs -->
                    <div class="page-content">
                        <div class="page-header">
                            <h1>
                                录入结果
                            </h1>
                        </div><!-- /.page-header -->
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="widget-box">
                                    <div class="widget-body">
                                        <div class="widget-main">
                                            <!-- #section:plugins/fuelux.wizard -->
                                            <div id="fuelux-wizard-container">
                                                <form class="form-horizontal" id="validation-form" enctype="multipart/form-data" method="post" action="{:U('/match/doSeedAdd')}"}>
                                                    <input type="hidden" id="match_id" name="match_id" value="{$info.id}" />
                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="rank">* 名次:</label>
                                                        <div class="col-xs-12 col-sm-3">
                                                            <div class="clearfix">
                                                                <input type="text" id="rank" name="rank" value="{$rank}" readonly />
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="type">* 选手类型:</label>
                                                        <div class="col-xs-12 col-sm-8">
                                                            <div class="clearfix">
                                                                <div class="radio">
                                                                    <label>
                                                                        <input type="radio" class="ace result-type" name="type" value="0" checked>
                                                                        <span class="lbl"> 普通选手</span>
                                                                    </label>
                                                                    <label>
                                                                        <input type="radio" class="ace result-type" name="type" value="1">
                                                                        <span class="lbl"> 种子选手</span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="member">* 昵称(普通):</label>
                                                        <div class="col-xs-12 col-sm-6" style="width: 20%;">
                                                            <select class="form-control" name="result_id" id="member">
                                                                <foreach name="list1" item="ls1" >
                                                                    <option value="{$ls1.id}"> {$ls1.name} </option>
                                                                </foreach>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="seed">* 姓名(种子):</label>
                                                        <div class="col-xs-12 col-sm-6" style="width: 20%;">
                                                            <select class="form-control" name="result_id" id="seed">
                                                                <foreach name="list2" item="ls2" >
                                                                    <option value="{$ls2.id}"> {$ls2.name} </option>
                                                                </foreach>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="vs_type">* 是否与种子选手对战:</label>
                                                        <div class="col-xs-12 col-sm-8">
                                                            <div class="clearfix">
                                                                <div class="radio">
                                                                    <label>
                                                                        <input type="radio" class="ace vs-type" name="vs_type" value="1" >
                                                                        <span class="lbl"> 是</span>
                                                                    </label>
                                                                    <label>
                                                                        <input type="radio" class="ace vs-type" name="vs_type" value="0" checked>
                                                                        <span class="lbl"> 否</span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>

                                                    <div class="form-group show_seed">
                                                        <label class="control-label col-xs-12 col-sm-3 no-padding-right" for="vs_seed">* 种子选手姓名:</label>
                                                        <div class="col-xs-12 col-sm-6" style="width: 20%;">
                                                            <select class="form-control" name="vs_seed" id="vs_seed">
                                                                <foreach name="list2" item="ls2" >
                                                                    <option value="{$ls2.id}"> {$ls2.name} </option>
                                                                </foreach>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="space-2"></div>
                                                </form>
                                            </div>
                                            <div class="clearfix form-actions">
                                                <div class="col-md-offset-3 col-md-9">
                                                    <button class="btn btn-info" type="button" id="data_submit">
                                                        <i class="ace-icon fa fa-check bigger-110"></i>
                                                        提交
                                                    </button>
                                                    &nbsp; &nbsp; &nbsp;
                                                    <button class="btn" type="reset" id="data_back">
                                                        <i class="ace-icon fa fa-undo bigger-110"></i>
                                                        返回
                                                    </button>
                                                </div>
                                            </div>
                                        </div><!-- /.widget-main -->
                                    </div><!-- /.widget-body -->
                                </div><!-- PAGE CONTENT ENDS -->
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div><!-- /.page-content -->
                </div>
            </div><!-- /.main-content -->
            <include file="Public:footer" />
        </div><!-- /.main-container -->
        <!-- basic scripts -->
        <!--[if !IE]> -->
        <script type="text/javascript">
            window.jQuery || document.write("<script src='__PUBLIC__/admin/assets/js/jquery.js'>"+"<"+"/script>");
        </script>
        <!-- <![endif]-->
        <!--[if IE]>
        <script type="text/javascript">
            window.jQuery || document.write("<script src='__PUBLIC__/admin/assets/js/jquery1x.js'>"+"<"+"/script>");
        </script>
        <![endif]-->
        <script type="text/javascript">
            if('ontouchstart' in document.documentElement) document.write("<script src='__PUBLIC__/admin/assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");
        </script>
        <script src="__PUBLIC__/admin/assets/js/bootstrap.js"></script>

        <!-- page specific plugin scripts -->
        <script src="__PUBLIC__/admin/assets/js/fuelux/fuelux.wizard.js"></script>
        <script src="__PUBLIC__/admin/assets/js/jquery.validate.js"></script>
        <script src="__PUBLIC__/admin/assets/js/additional-methods.js"></script>
        <script src="__PUBLIC__/admin/assets/js/bootbox.js"></script>
        <script src="__PUBLIC__/admin/assets/js/jquery.maskedinput.js"></script>
        <script src="__PUBLIC__/admin/assets/js/select2.js"></script>

        <!-- ace scripts -->
        <script src="__PUBLIC__/admin/assets/js/ace/elements.scroller.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.colorpicker.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.fileinput.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.typeahead.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.wysiwyg.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.spinner.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.treeview.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.wizard.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/elements.aside.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.ajax-content.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.touch-drag.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.sidebar.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.sidebar-scroll-1.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.submenu-hover.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.widget-box.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.settings.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.settings-rtl.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.settings-skin.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.widget-on-reload.js"></script>
        <script src="__PUBLIC__/admin/assets/js/ace/ace.searchbox-autocomplete.js"></script>

        <!-- inline scripts related to this page -->
        <script type="text/javascript">
            jQuery(function($) {

                $('.nav-list li').removeClass('open').removeClass('active');
                $('#left_2').addClass('open').addClass('active');
                $('#left_2_1').addClass('active');

                $('#seed').attr('disabled', true);
                $('.show_seed').hide();

                $('#data_submit').on('click', function() {
                    // 姓名
                    var name = $('#name').val();
                    if (name == '') {
                        alert('姓名不能为空');
                        return;
                    }
                    // 介绍
//                    var regex = /^[0-9]*$/;
//                    var rank = $('#rank').val();
//                    if (rank == '') {
//                        alert('名次不能为空');
//                        return;
//                    } else if(!regex.test(rank)) {
//                        alert('名次必须为数字');
//                        return;
//                    }
                    var mid = $('#match_id').val();
                    $.ajax({
                        type: "POST",
                        dataType: "json",
                        data: $("#validation-form").serialize(),
                        async: true,
                        url: "__URL__/doResultInput",
                        success : function(res) {
                            if (res) {
                                if (res.code == 100) {
                                    alert("录入成功");
                                    window.location.href = '__URL__/result/match_id/' + mid;
                                    return;
                                } else {
                                    alert(res.message);
                                    return;
                                }
                            } else {
                                alert("添加失败");
                            }
                        },
                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                            alert("网络异常");
                        }
                    });

                });

				$('#data_back').on('click', function() {
                    history.back();
				});

                $('.result-type').change(function() {
                    if ($(this).val() == 1) {
                        $('#member').attr('disabled', true);
                        $('#seed').removeAttr('disabled');
                    } else {
                        $('#seed').attr('disabled', true);
                        $('#member').removeAttr('disabled');

                    }
                });

                $('.vs-type').change(function() {
                    if ($(this).val() == 1) {
                        $('.show_seed').show();
                    } else {
                        $('.show_seed').hide();
                    }
                });

            });
        </script>
    </body>
</html>